#!/usr/bin/env python
# -*- coding: utf-8 -*-

import psutil

# print psutil.virtual_memory();
# vmem(total=12865200128L, available=9350098944L, percent=27.3, used=3708203008L, free=9156997120L, active=171577344, inactive=161665024, buffers=0L, cached=193101824)

# free buff cache siso
print "" % (psutil.virtual_memory().available >> 20)
# >> 20 byte -> mB

# sin sout 在window下无意义，报错，其他平台OK
print psutil.swap_memory().sin
print psutil.swap_memory().sout
